package com.spark.incoicings.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spark.invoicings.entity.ProcuredSupplier;
import com.spark.invoicings.utils.Result;

import java.util.List;
import java.util.Map;

public interface ProcuredSupplierService extends IService<ProcuredSupplier> {

    /**
     * 根据id获取供应商
     * @param id
     * @return
     */
    ProcuredSupplier selectSupplierById(Integer id);

    /**
     * 保存供应商
     * @param supplier
     * @return
     */
    Result addProcuredSupplier(ProcuredSupplier supplier);

    /**
     * 根据id删除供应商
     * @param id
     * @return
     */
    boolean delSupplierById(Integer id);

    /**
     * 查询所有供应商
     * @param map
     * @return
     */
    List<ProcuredSupplier> selectSupplierAll(Map<String, Object> map);

    /**
     * 根据id更新供应商
     * @param supplier
     * @return
     */
    boolean updateSupplierById(ProcuredSupplier supplier);

}
